package com.dfrz.problem.service.impl;


import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.dfrz.problem.dao.RoleDao;
import com.dfrz.problem.dao.impl.RoleDaoImpl;
import com.dfrz.problem.model.Role;
import com.dfrz.problem.service.RoleService;

public class RoleserviceImpl implements RoleService{
	
	@SuppressWarnings("unused")
	private static final Logger logger = LoggerFactory.getLogger(RoleDaoImpl.class);
	RoleDao roleDao;
	
	public void setRoleDao(RoleDao roleDao) {
		this.roleDao = roleDao;
	}
	
	@Override
	public Role getRole(String restring) {
		return roleDao.getRole(restring);
	}
	
	@Override
	public boolean deleteRole(String roleId) {
		return roleDao.deleteRole(roleId);
	}
	
	@Override
	public List<Role> roleList() {
		return roleDao.roleList();
	}

	@Override
	public Boolean updateRoleInfo(Role role) {
		return roleDao.updateRole(role);
	}

	@Override
	public boolean checkRole(int roleId) {
		return false;
	}

	@Override
	public Role getRole(int roleId) {
		return (Role) roleDao.getRole(roleId);
	}
	
	@Override
	public Boolean addRole(Role role) {
		return roleDao.addRole(role);
	}
}
